#include <stdio.h>

int main(){
    int n;
    printf("Enter a number: ");
    scanf("%d",&n);
    float h=100;
    float d=100;
    for(int i=1;i<n;i++){
        h/=2;
        d+=2*h;
    }
    printf("distance = %f, rebound = %f\n",d,h/2);
}
